Conversation
Co-authored-by: Martin Magnus <martin.beckmann@protonmail.com>
|
|
||
| #[tokio::test] | ||
| #[ignore] | ||
| async fn accepts_new_settle_requests_after_timeout() { |
There was a problem hiding this comment.
We can nuke this whole test because we've got a the check here now: https://github.com/cowprotocol/services/pull/4338/changes#diff-8534e72b43bec3cc35e3a704050781525cf44370eb548da8d5ae8ba3fb2b06ebR237
There was a problem hiding this comment.
Code Review
This pull request refactors settlement request handling by replacing the internal mpsc queue with an admission semaphore in the SubmitterPool, allowing for buffered requests and concurrent EIP-7702 submissions. It introduces a SettleTaskHandle to manage task lifecycles with a grace period for cleanup and removes the background request processing loop in favor of direct task spawning. Tests have been updated to reflect the new semaphore-based admission logic. No critical issues were found, and I have no feedback to provide.
Description
The reference driver rejects new solutions when there is already a backlog of solutions that still need to be submitted because they will most likely not be mined in time. This is intended to protect very competitive solvers from penalties when they win too much but can't submit fast enough.
#4167 introduced a bug where the check whether to reject the
/solverequest only looks at the available tx submission slots but not the settle queue.This has the consequence that a solver with only a single submission EOA that won an auction will reject
/solverequests until the previous solution was submitted.Changes
Add a semaphore with capacity equal to queue size to mimic missing queue behavior.